package com.jt.yygh.hospital.controller;

import com.jt.yygh.common.result.Result;
import com.jt.yygh.hospital.VO.hosp.HospitalQueryVo;
import com.jt.yygh.hospital.entity.hosp.Hospital;
import com.jt.yygh.hospital.service.HospitalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.*;

/**
 * @author jiang tao
 * @date 2022/3/6
 * @description:
 **/
@RestController
@RequestMapping("/admin/hosp/hospital")
public class HospitalController {
    @Autowired
    private HospitalService hospitalService;
    private com.jt.yygh.hospital.VO.hosp.HospitalQueryVo HospitalQueryVo;

    //医院列表
    @GetMapping("/list/{page}/{limit}")
    public Result listHospital(@PathVariable Integer page, @PathVariable Integer limit, HospitalQueryVo hospitalQueryVo){
        Page<Hospital> hospitals = hospitalService.selectPage(page, limit, hospitalQueryVo);
        return Result.success(hospitals);

    }

}
